<template>
    <div>{{ count }}</div>
    <div>
        <el-button type="primary" @click="onAdd">Change number</el-button>
    </div>
</template>

<script setup lang="ts">
import { defineProps, defineEmits } from 'vue';
const props = defineProps<{ count: number }>()
const emits = defineEmits(['update:count'])

const onAdd = () => {
    emits('update:count', Math.random())
}
</script>